package com.great.codewars;

import org.junit.Test;

public class Demo1 {
	int[] numbers = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };

	/**
	 * 按照规定格式来遍历数组
	 */
	@Test
	public void te() {
		String s = String.format("(%d%d%d) %d%d%d-%d%d%d%d", numbers[0], numbers[1], numbers[2], numbers[3], numbers[4],
				numbers[5], numbers[6], numbers[7], numbers[8], numbers[9]);
		System.out.println(s);

		s = String.format("(%d%d%d) %d%d%d-%d%d%d%d", java.util.stream.IntStream.of(numbers).boxed().toArray());
		System.out.println(s);
	}
}
